package com.ny.wlw;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbUntil {
   private static final String URL = "jdbc:mysql://localhost:3306/test";
    private static final String DB_USERNAME= "root";
     private static final String DB_PASSWORD = "123456";
     public Connection getCon() throws ClassNotFoundException, SQLException {
       Class.forName("com.mysql.jdbc.Driver");
       Connection conn = DriverManager.getConnection(URL, DB_USERNAME, DB_PASSWORD);
       return conn;
     }
}
